package com.ruoyi.aftserv.service.impl;

import java.util.List;

import com.ruoyi.aftserv.domain.AfterServiceApplyInfoQuery;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.aftserv.mapper.AfterServiceApplyInfoMapper;
import com.ruoyi.aftserv.domain.AfterServiceApplyInfo;
import com.ruoyi.aftserv.service.IAfterServiceApplyInfoService;
import com.ruoyi.common.core.text.Convert;

/**
 * 学生报名管理Service业务层处理
 * 
 * @author 张艳羽
 * @date 2024-08-22
 */
@Service
public class AfterServiceApplyInfoServiceImpl implements IAfterServiceApplyInfoService 
{
    @Autowired
    private AfterServiceApplyInfoMapper afterServiceApplyInfoMapper;

    /**
     * 查询学生报名管理
     * 
     * @param id 学生报名管理主键
     * @return 学生报名管理
     */
    @Override
    public AfterServiceApplyInfo selectAfterServiceApplyInfoById(Long id)
    {
        return afterServiceApplyInfoMapper.selectAfterServiceApplyInfoById(id);
    }

    /**
     * 查询学生报名管理列表
     * 
     * @param afterServiceApplyInfo 学生报名管理
     * @return 学生报名管理
     */
    @Override
    public List<AfterServiceApplyInfo> selectAfterServiceApplyInfoList(AfterServiceApplyInfo afterServiceApplyInfo)
    {
        return afterServiceApplyInfoMapper.selectAfterServiceApplyInfoList(afterServiceApplyInfo);
    }

    @Override
    public List<AfterServiceApplyInfoQuery> selectAfterServiceApplyInfoQueryList(AfterServiceApplyInfoQuery query) {
        return afterServiceApplyInfoMapper.selectAfterServiceApplyInfoQueryList(query);
    }

    @Override
    public AfterServiceApplyInfoQuery selectAfterServiceApplyInfoQueryById(Long id) {
        return afterServiceApplyInfoMapper.selectAfterServiceApplyInfoQueryById(id);
    }

    /**
     * 新增学生报名管理
     * 
     * @param afterServiceApplyInfo 学生报名管理
     * @return 结果
     */
    @Override
    public int insertAfterServiceApplyInfo(AfterServiceApplyInfo afterServiceApplyInfo)
    {
        afterServiceApplyInfo.setCreateTime(DateUtils.getNowDate());
        return afterServiceApplyInfoMapper.insertAfterServiceApplyInfo(afterServiceApplyInfo);
    }

    /**
     * 修改学生报名管理
     * 
     * @param afterServiceApplyInfo 学生报名管理
     * @return 结果
     */
    @Override
    public int updateAfterServiceApplyInfo(AfterServiceApplyInfo afterServiceApplyInfo)
    {
        afterServiceApplyInfo.setUpdateTime(DateUtils.getNowDate());
        return afterServiceApplyInfoMapper.updateAfterServiceApplyInfo(afterServiceApplyInfo);
    }

    /**
     * 批量删除学生报名管理
     * 
     * @param ids 需要删除的学生报名管理主键
     * @return 结果
     */
    @Override
    public int deleteAfterServiceApplyInfoByIds(String ids)
    {
        return afterServiceApplyInfoMapper.deleteAfterServiceApplyInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除学生报名管理信息
     * 
     * @param id 学生报名管理主键
     * @return 结果
     */
    @Override
    public int deleteAfterServiceApplyInfoById(Long id)
    {
        return afterServiceApplyInfoMapper.deleteAfterServiceApplyInfoById(id);
    }
}
